XRApath

Syntax: @XRApath String

The XRApath command can be used to return the directory path of the current application file (filename.XRA) into the given String variable.

The default path locations are not the same on different versions of Windows and even on different PC configurations. The @XRApath command tells you where the current (i.e. running) XRA file is located so that you can use the String within your application as a path prefix.

You can see it used extensively in the sample applications. By convention, they use @XRApath XRApath so that the string name is more meaningful, but this is quite optional. The String used must be defined in the Knowledge Explorer. Note that the path returned into the string includes the closing backslash \ of the path.

Example

When running the application C:\xr3\samples\kbs\expenses.xra

@XRApath StringVar

would return C:\xr3\samples\kbs\ into the string called StringVar.

This would enable use of StringVar in your other @commands, such as:

@ReadVariables StringVar + 'Myfile'

would read variables from the file C:\xr3\samples\kbs\myfile

To make relative path references you could use the ..\ convention. For example: @ReadVariables StringVar + '..\' + 'Myfile' would reference the file C:\xr3\samples\myfile.